<template>
	<view style="width:100%;height:130rpx;"></view>
	<view class="shopBut">
		<view class="shopleft" v-if="!(show||empty)">
			<view>
				<text>合计：</text>
				<text>￥</text>
				<text>{{total}}</text>
			</view>
			<view>共优惠:-￥{{Discount}}</view>
		</view>
		<view class="shopAll" @click="SelectAll()" v-if="show">
			<uni-icons type="circle" size="22" color="#666" v-if="!Select"></uni-icons>
			<uni-icons type="checkbox-filled" size="22" color="#3EA2FF" v-else></uni-icons>
			<text>全选</text>
		</view>
		<view v-if="empty"></view>
		<view :class="empty?'submits':'submit'" @click="submit()" v-if="title">{{title}}</view>
	</view>
</template> 

<script setup lang="ts">
	const props = defineProps({
	  total: { type: Number },
	  Discount:{ type: Number },
	  title: { type: String },
	  show: { type: Boolean },
	  Select:{ type: Boolean },
	  empty:{ type: Boolean },
	});
	const emit = defineEmits(['SelectAll','submit']);
	function SelectAll(){
		emit('SelectAll');
	}
	function submit(){
		emit('submit');
	}
</script>

<style scoped lang="less">
	@import url('../groupBenefits/less/shopBot.less');
</style>